<template>
  <div class="ov-box" :class="theme">
    <h4>{{title}}</h4>
    <div class="ov-box-bd">
      <slot></slot>
    </div>
  </div>
</template>

<script>
import {mapGetters} from 'vuex';
export default{
  props:{
    title:{
      type:String,
      default:''
    },
  },
  computed:{
    ...mapGetters(["theme"])
  }
}
</script>

<style lang="scss" scoped>
  .ov-box{
    position: relative;
    display: flex;
    height: 100%;
    flex-direction: column;
    overflow: hidden;

    h4{
      display: flex;
      height: 30px;
      min-height: 30px;
      align-items: center;
      font-size: 17px;
      text-shadow: 0px 0px 9px #159AFF;
      font-weight: normal;
      color: #fff;
      padding-left: 16px;
      position: relative;
      background: rgba(99, 206, 246, .2);
      margin: 0;
      &::before{
        content: '';
        width: 4px;
        height: 30px;
        background: #63CEF6;
        position: absolute;
        left: 0;
        top: 0;
      }
      &::after{
        content: '';
        width: 78px;
        height: 32px;
        background: url("../../assets/images/ovhead_r.png") 0 0 no-repeat;
        position: absolute;
        right: 15px;
        top: 4px;
      }
    }
    &::after{
      content: '';
      width: 100%;
      height: 7px;
      background: url("../../assets/images/ovbox-b.png") 0 0 no-repeat;
      background-size: cover;
      position: absolute;
      left: 0;
      bottom: 0px;
    }
  .ov-box-bd{
    padding: 20px 0;
    flex: 1;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
  }
}

.light{
  width: 100% !important;
  .ov-box{
    h4{
      text-shadow: none;
      background: linear-gradient(90deg, #1D42AB 0%, #1E91FE 100%);
      &::before{
        background: #FE9811;
      }
      &::after{
        display: none;
      }
    }
    &::after{
      background: url("../../assets/images/ovbox-b_light.png") 0 0 no-repeat;
      background-size: 100% 100%;
    }
  }
}


@media (max-height:860px) {
  .ov-box{
    h4{
      height: 36px;
      font-size: 20px;
      min-height: 36px;
      &::before{
        height: 36px;
      }
    }
    .ov-box-bd{
      padding: 15px;
    }
  }
}
</style>